#!/usr/bin/env bats

@test "no-dot: searches both normal and dot files by default" {
  cd $BATS_TEST_DIRNAME
  expected="file11:3:In the day of grief, be mild
.dir1/file11:3:In the day of grief, be mild"
  result="$(fish -c 'tbgs grief')"
  [ "$result" = "$expected" ]
}

@test "no-dot: dynamic overwrites static" {
  cd $BATS_TEST_DIRNAME
  expected="file11:3:In the day of grief, be mild"
  result="$(fish -c 'tbgs grief no-dot')"
  result="$(fish -c 'tbgs no-dot grief')"
  [ "$result" = "$expected" ]
}
